<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function setStudent(name,age,gender){
            var obj=new Object();
            obj.name=name;
            obj.age=age;
            obj.gender=gender;
            obj.say=function(){
                alert("hello say-----")
            }
            return obj;
        }
        var stu1=setStudent("lisi",12,"male");
        var stu2=setStudent("tom",15,"male");
        stu1.say();
        stu2.say();
        // console.log(stu1);
        // console.log(stu2);
        // console.log(stu1.say==stu2.say);//false
        //say是引用数据类型，==比较，比较引用地址，new,新建一块内存空间,所以不在一起，所以不相等
        console.log(stu1.constructor);
        console.log(stu2.constructor);
    </script>
</head>
<body>
    
</body>
</html>